
#region Imports

using System;
using System.Collections.Generic;
using System.Runtime.Remoting.Proxies;
using System.Text;

#endregion

namespace Justa.Reflection
{
    /// <summary>
    /// 
    /// </summary>
    /// 
    /// <author>Abel Perez</author>
    /// 
    public abstract class DynamicProxy : RealProxy
    {
        /// <summary>
        /// 
        /// </summary>
        /// 
        protected readonly object target;

        /// <summary>
        /// 
        /// </summary>
        /// 
        protected readonly Type typeToProxy;

        /// <summary>
        /// 
        /// </summary>
        /// 
        /// <param name="target"></param>
        /// <param name="classToProxy"></param>
        /// 
        public DynamicProxy(object target, Type classToProxy)
            : base(classToProxy)
        {
            if (target == null)
            {
                throw new ArgumentException("Specified target is null.", "target");
            }
            if (classToProxy == null)
            {
                throw new ArgumentException("Specified class to proxy is null.", "classToProxy");
            }

            this.target = target;
            this.typeToProxy = classToProxy;
        }
    }
}
